# -*- coding: UTF-8 -*-
from tools.Request_General import BaseAPI


class DomainModel(BaseAPI):
    """
    领域模型3.0
    """

    def cube_create(self, payload):
        """
        领域模型3.0创建
        """
        r = self.request_send(json=payload)
        return r

    def cube_query(self, par):
        """
        领域模型3.0查询
        """
        r = self.request_send(params=par)
        return r

    def data_save(self, payload):
        """
        领域模型3.0数据保存
        """
        r = self.request_send(json=payload)
        return r

    def data_query(self, par):
        """
        领域模型3.0数据查询
        """
        r = self.request_send(params=par)
        return r

    def structures_query(self, par):
        """
        领域模型3.0结构查询
        """
        r = self.request_send(params=par)
        return r

if __name__ == '__main__':
    # 获取headers
    headers = {"cookie": "v3-dev_deepfos_users=%7B%22color%22%3A%226%22%2C%22email%22%3A%22siqi.qiu%40deepfinance.com%22%2C%22invitationActivation%22%3Atrue%2C%22nickName%22%3A%22qiuqiuqiu123456789%22%2C%22nickname%22%3A%22qiuqiuqiu123456789%22%2C%22token%22%3A%22151CEC2A96362525451BBED74926B62726F935D6A9A472AF615EEFEA70894CC8%22%2C%22tokenKey%22%3A%22v3-dev_deepfos_token%22%2C%22type%22%3A1%2C%22userId%22%3A%2283bc7bee-3382-4f19-8883-5a6bf60f5dab%22%2C%22username%22%3A%22qiuqiuqiu2%22%7D; v3test_deepfos_users=%7B%22color%22%3A%222%22%2C%22email%22%3A%22wanyu.jiang%40deepfinance.com%22%2C%22invitationActivation%22%3Atrue%2C%22mobilePhone%22%3A%2217602189130%22%2C%22nickName%22%3A%22%E7%85%8E%E4%B8%80%E7%A2%97%E9%B1%BC%22%2C%22nickname%22%3A%22%E7%85%8E%E4%B8%80%E7%A2%97%E9%B1%BC%22%2C%22token%22%3A%22E882DC293AD73C048E956F0F8A32B5E14F27A84DD08E8F5F9D96C6ED4F5D4DA9%22%2C%22tokenKey%22%3A%22v3test_deepfos_token%22%2C%22type%22%3A1%2C%22userId%22%3A%22f0c3e4eb-fc12-4aad-a398-868f0ee4cd70%22%2C%22username%22%3A%22jiangwanyu%22%7D; v3test_deepfos_token=E882DC293AD73C048E956F0F8A32B5E14F27A84DD08E8F5F9D96C6ED4F5D4DA9; cloud_deepfos_users=%7B%22color%22%3A%226%22%2C%22email%22%3A%22wanyu.jiang%40proinnova.com.cn%22%2C%22invitationActivation%22%3Atrue%2C%22nickName%22%3A%22%E5%A7%9C%E6%99%9A%E7%8E%89%22%2C%22nickname%22%3A%22%E5%A7%9C%E6%99%9A%E7%8E%89%22%2C%22token%22%3A%22E882DC293AD73C048E956F0F8A32B5E1F4DE9EA4EFBC51ADF515061F78FBFD46%22%2C%22tokenKey%22%3A%22cloud_deepfos_token%22%2C%22type%22%3A1%2C%22userId%22%3A%228e3ce009-d6ee-4fe4-9759-1fcc5146fbbe%22%2C%22username%22%3A%22jiangwanyu%22%7D; cloud_deepfos_token=E882DC293AD73C048E956F0F8A32B5E1F4DE9EA4EFBC51ADF515061F78FBFD46; hotfix_deepfos_users=%7B%22color%22%3A%224%22%2C%22email%22%3A%22wanyu.jiang%40deepfinance.com%22%2C%22invitationActivation%22%3Atrue%2C%22nickName%22%3A%22%E5%A7%9C%E6%99%9A%E7%8E%89%22%2C%22nickname%22%3A%22%E5%A7%9C%E6%99%9A%E7%8E%89%22%2C%22token%22%3A%22C162D139E601C437673D79F84871B96EE31EF92ECA5180F30B76A4ED4906B635%22%2C%22tokenKey%22%3A%22hotfix_deepfos_token%22%2C%22type%22%3A1%2C%22userId%22%3A%2257ad4e48-9e06-4f77-900b-2c70dfee4d7a%22%2C%22username%22%3A%22Willy%22%7D; hotfix_deepfos_token=C162D139E601C437673D79F84871B96EE31EF92ECA5180F30B76A4ED4906B635; shtest_deepfos_users=%7B%22color%22%3A%227%22%2C%22email%22%3A%22wanyu.jiang%40proinnova.com.cn%22%2C%22invitationActivation%22%3Atrue%2C%22mobilePhone%22%3A%22%22%2C%22nickName%22%3A%22%22%2C%22nickname%22%3A%22%22%2C%22token%22%3A%226B05DE3CC456E3DDB9D535EEC3D6727C7F5264712E1DD34A3962A75A760C03F4%22%2C%22tokenKey%22%3A%22shtest_deepfos_token%22%2C%22type%22%3A1%2C%22userId%22%3A%22cac018a5-3a06-4588-ace2-51ea151e1c7b%22%2C%22username%22%3A%2221R9qTvtnw%22%7D; shtest_deepfos_token=6B05DE3CC456E3DDB9D535EEC3D6727C7F5264712E1DD34A3962A75A760C03F4; alpha_deepfos_users=%7B%22color%22%3A%226%22%2C%22email%22%3A%22wanyu.jiang%40proinnova.com.cn%22%2C%22invitationActivation%22%3Atrue%2C%22nickName%22%3A%22%E5%A7%9C%E6%99%9A%E7%8E%89%22%2C%22nickname%22%3A%22%E5%A7%9C%E6%99%9A%E7%8E%89%22%2C%22token%22%3A%22E882DC293AD73C048E956F0F8A32B5E10CDF6121F458019197D2E0C78C750DD8%22%2C%22tokenKey%22%3A%22alpha_deepfos_token%22%2C%22type%22%3A1%2C%22userId%22%3A%228e3ce009-d6ee-4fe4-9759-1fcc5146fbbe%22%2C%22username%22%3A%22jiangwanyu%22%7D; alpha_deepfos_token=E882DC293AD73C048E956F0F8A32B5E10CDF6121F458019197D2E0C78C750DD8"}
    dp = DomainModel(headers)
    r= dp.cube_query({})

    print(r.text)
    pass

